<form id="edit-form" class="form-horizontal" style="position:relative;background: #fff" role="form"
    data-toggle="validator" method="POST" action="">
    <link href="/assets/css/btn-switcher.css" rel="stylesheet" />
    <style>
        .offset-xs-2 {
            margin-left: 16.66666667%;
        }
    </style>
    <div class="panel-body">
        <!-- 选项卡导航 -->
        <ul class="nav nav-tabs" role="tablist">
            <li role="presentation" class="active">
                <a href="#basic-info" aria-controls="basic-info" role="tab" data-toggle="tab">基本信息</a>
            </li>
            <li role="presentation">
                <a href="#project-detail" aria-controls="project-detail" role="tab" data-toggle="tab">项目详情</a>
            </li>
            <li role="presentation">
                <a href="#class-info" aria-controls="class-info" role="tab" data-toggle="tab">班级情况</a>
            </li>
            <li role="presentation">
                <a href="#student-detail" aria-controls="student-detail" role="tab" data-toggle="tab">报名学员详情</a>
            </li>
            <li role="presentation">
                <a href="#registration-info" aria-controls="registration-info" role="tab" data-toggle="tab">报名情况</a>
            </li>
            <li role="presentation">
                <a href="#registration-summary" aria-controls="registration-summary" role="tab"
                    data-toggle="tab">报名情况汇总</a>
            </li>
            <li role="presentation">
                <a href="#pre-registration-map" aria-controls="pre-registration-map" role="tab"
                    data-toggle="tab">预报名地理位置分布图</a>
            </li>
        </ul>

        <!-- 选项卡内容 -->
        <div class="tab-content">
            <!-- 基本信息 -->
            <div role="tabpanel" class="tab-pane fade in active" id="basic-info"  style="padding-top: 30px;">
                <!-- 原有所有表单内容 -->
                <input type="hidden" id="row" name="data" value='{}' />
                <input type="hidden" id="id" name="row[id]" value='' />


                <div class="form-group">
                    <label for="c-title" class="control-label col-xs-12 col-sm-2">报名项目名称:</label>
                    <div class="col-xs-12 col-sm-8" id="div-title">
                        <input type="text" id="c-title" name="row[title]" value="" class="form-control" title="title"
                            placeholder="" data-rule="" data-tip="报名项目名称" />
                    </div>
                </div>



                <div class="form-group">
                    <label for="c-apply_type" class="control-label col-xs-12 col-sm-2">报名类型:</label>
                    <div class="col-xs-12 col-sm-8" id="div-apply_type">
                        <label for="row_apply_type_0">
                            <input id="row_apply_type_0" name="row[apply_type]" type="radio" value="0" /> 预报名
                        </label>
                        <label for="row_apply_type_1">
                            <input id="row_apply_type_1" name="row[apply_type]" type="radio" value="1" /> 报名缴费
                        </label>
                    </div>
                </div>

                <div class="form-group">
                    <label for="c-table_type" class="control-label col-xs-12 col-sm-2">课堂类型:</label>
                    <div class="col-xs-12 col-sm-8" id="div-table_type">
                        <label for="row_table_type_1">
                            <input id="row_table_type_1" name="row[table_type]" type="radio" value="1" /> 学校
                        </label>
                        <label for="row_table_type_2" style="margin-left:10px;">
                            <input id="row_table_type_2" name="row[table_type]" type="radio" value="2" /> 社区
                        </label>
                    </div>
                </div>

                <div class="form-group">
                    <label class="control-label col-xs-12 col-sm-2">课程表项目名称:</label>
                    <div class="col-xs-12 col-sm-8">
                        <select name="row[table_id]" id="c-table_id" class="form-control" style="display:none;">
                            <option value="">请选择课程表</option>
                        </select>
                        <select name="row[publicwelfare_id]" id="c-publicwelfare_id" class="form-control" style="display:none; margin-top:8px;">
                            <option value="">请选择课程表</option>
                        </select>
                    </div>
                </div>

                <div class="form-group" id="course-type-group" style="display: none;">
                    <label for="c-course_type" class="control-label col-xs-12 col-sm-2">课程类型:</label>
                    <div class="col-xs-12 col-sm-8" id="div-course_type">
                        <label for="row_course_type_1">
                            <input id="row_course_type_1" name="row[course_type]" type="radio" value="1" /> 课程
                        </label>
                        <label for="row_course_type_2">
                            <input id="row_course_type_2" name="row[course_type]" type="radio" value="2" /> 活动
                        </label>
                    </div>
                </div>

                <div class="form-group">
                    <label for="c-enable_registration_conditions" class="control-label col-xs-12 col-sm-2">报名条件:</label>
                    <div class="col-xs-12 col-sm-8" id="div-enable_registration_conditions">
                        <input id="c-enable_registration_conditions" name="row[enable_registration_conditions]"
                            type="hidden" value="0">
                        <div style="display: flex; align-items: center;">
                            <a href="javascript:;" data-toggle="switcher" class="btn-switcher text-gray"
                                data-input-id="c-enable_registration_conditions" data-yes="1" data-no="0">
                                <i class="fa fa-toggle-on fa-flip-horizontal fa-2x"></i>
                            </a>
                            <div style="margin-left: 10px;">
                                <div data-favisible="switch=1" class="text-success">开启</div>
                                <div data-favisible="switch=0" class="text-gray">关闭</div>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="form-group" id="registration-conditions-settings" style="display: none;">
                    <div class="col-xs-10 offset-xs-2 col-sm-8 col-sm-offset-2">
                        <div class="panel panel-default">
                            <div class="panel-heading">
                                <h3 class="panel-title">报名条件设置</h3>
                            </div>
                            <div class="panel-body">
                                <div class="form-group">
                                    <label class="control-label col-xs-12 col-sm-3">男性年龄要求:</label>
                                    <div class="col-xs-12 col-sm-8">
                                        <div class="row">
                                            <div class="col-xs-5">
                                                <input type="number" name="row[male_age_min]" class="form-control"
                                                    placeholder="最小年龄" min="0" max="120" />
                                            </div>
                                            <div class="col-xs-2 text-center" style="line-height: 34px;">至</div>
                                            <div class="col-xs-5">
                                                <input type="number" name="row[male_age_max]" class="form-control"
                                                    placeholder="最大年龄" min="0" max="120" />
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="control-label col-xs-12 col-sm-3">女性年龄要求:</label>
                                    <div class="col-xs-12 col-sm-8">
                                        <div class="row">
                                            <div class="col-xs-5">
                                                <input type="number" name="row[female_age_min]" class="form-control"
                                                    placeholder="最小年龄" min="0" max="120" />
                                            </div>
                                            <div class="col-xs-2 text-center" style="line-height: 34px;">至</div>
                                            <div class="col-xs-5">
                                                <input type="number" name="row[female_age_max]" class="form-control"
                                                    placeholder="最大年龄" min="0" max="120" />
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="control-label col-xs-12 col-sm-3">其他条件:</label>
                                    <div class="col-xs-12 col-sm-8">
                                        <textarea name="row[other_conditions]" class="form-control" rows="3"
                                            placeholder="请输入其他报名条件要求"></textarea>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <!-- 报名须知设置 -->
                <div class="form-group">
                    <label for="c-enable_terms_agreement" class="control-label col-xs-12 col-sm-2">报名须知:</label>
                    <div class="col-xs-12 col-sm-8" id="div-enable_terms_agreement">
                        <input id="c-enable_terms_agreement" name="row[enable_terms_agreement]" type="hidden" value="0">
                        <div style="display: flex; align-items: center;">
                            <a href="javascript:;" data-toggle="switcher" class="btn-switcher text-gray" 
                               data-input-id="c-enable_terms_agreement" data-yes="1" data-no="0">
                                <i class="fa fa-toggle-on fa-flip-horizontal fa-2x"></i>
                            </a>
                            <div style="margin-left: 10px;">
                                <div data-favisible="switch=1" class="text-success">开启</div>
                                <div data-favisible="switch=0" class="text-gray">关闭</div>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="form-group" id="terms-agreement-settings" style="display: none;">
                    <div class="col-xs-10 offset-xs-2 col-sm-8 col-sm-offset-2">
                        <div class="panel panel-default">
                            <div class="panel-heading">
                                <h3 class="panel-title">《报名须知》设置</h3>
                            </div>
                            <div class="panel-body">
                                <div class="form-group">
                                    <label class="control-label col-xs-12 col-sm-3">主题:</label>
                                    <div class="col-xs-12 col-sm-8">
                                        <input type="text" name="row[terms_title]" class="form-control" 
                                               placeholder="请输入报名须知主题，如：报名须知、注意事项等" value="报名须知"/>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="control-label col-xs-12 col-sm-3">正文:</label>
                                    <div class="col-xs-12 col-sm-8">
                                        <textarea name="row[terms_content]" class="form-control editor" rows="8" 
                                                  placeholder="请输入报名须知的详细内容，支持富文本格式"></textarea>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <div class="col-xs-12 col-sm-8 col-sm-offset-3">
                                        <div class="help-block">
                                            <small class="text-muted">开启后用户报名时需要勾选"我已阅读并同意《报名须知》</small>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="form-group">
                    <label for="c-is_staged" class="control-label col-xs-12 col-sm-2">分阶段报名:</label>
                    <div class="col-xs-12 col-sm-8" id="div-is_staged">
                        <input id="c-is_staged" name="row[is_staged]" type="hidden" value="0">
                        <div style="display: flex; align-items: center;">
                            <a href="javascript:;" data-toggle="switcher" class="btn-switcher"
                                data-input-id="c-is_staged" data-yes="1" data-no="0">
                                <i class="fa fa-toggle-on fa-flip-horizontal fa-2x"></i>
                            </a>
                            <div style="margin-left: 10px;">
                                <div data-favisible="switch=1" class="text-success">是</div>
                                <div data-favisible="switch=0" class="text-gray">否</div>
                            </div>
                        </div>
                    </div>
                </div>

                <!-- 添加的分阶段报名信息 -->
                <div class="form-group staged-registration" id="staged-registration-info" style="display: none;">
                    <div class="col-xs-10 offset-xs-2 col-sm-8 col-sm-offset-2">
                        <!-- 第一阶段 -->
                        <div class="panel panel-default">
                            <div class="panel-heading">
                                <h3 class="panel-title">第一阶段</h3>
                            </div>
                            <div class="panel-body">
                                <div class="form-group">
                                    <label class="control-label col-xs-12 col-sm-3">报名开始时间:</label>
                                    <div class="col-xs-12 col-sm-8">
                                        <input type="text" name="row[stage1_start_time]"
                                            class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss"
                                            data-use-current="true" />
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="control-label col-xs-12 col-sm-3">报名结束时间:</label>
                                    <div class="col-xs-12 col-sm-8">
                                        <input type="text" name="row[stage1_end_time]"
                                            class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss"
                                            data-use-current="true" />
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="control-label col-xs-12 col-sm-3">报名对象:</label>
                                    <div class="col-xs-12 col-sm-8">
                                        <select name="row[stage1_target]" class="form-control">
                                            <option value="1">仅预报名人群</option>
                                            <option value="2">不确定人群</option>
                                            <option value="3">班级人群</option>
                                        </select>
                                    </div>
                                </div>
                            </div>
                        </div>

                        <!-- 第二阶段 -->
                        <div class="panel panel-default">
                            <div class="panel-heading">
                                <h3 class="panel-title">第二阶段</h3>
                            </div>
                            <div class="panel-body">
                                <div class="form-group">
                                    <label class="control-label col-xs-12 col-sm-3">报名开始时间:</label>
                                    <div class="col-xs-12 col-sm-8">
                                        <input type="text" name="row[stage2_start_time]"
                                            class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss"
                                            data-use-current="true" />
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="control-label col-xs-12 col-sm-3">报名结束时间:</label>
                                    <div class="col-xs-12 col-sm-8">
                                        <input type="text" name="row[stage2_end_time]"
                                            class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss"
                                            data-use-current="true" />
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="control-label col-xs-12 col-sm-3">报名对象:</label>
                                    <div class="col-xs-12 col-sm-8">
                                        <select name="row[stage2_target]" class="form-control">
                                            <option value="1">仅预报名人群</option>
                                            <option value="2">不确定人群</option>
                                            <option value="3">班级人群</option>
                                        </select>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <!-- 分阶段报名信息结束 -->

                <!-- 报名数量限制设置 -->
                <div class="form-group">
                    <label for="c-enable_quantity_limit" class="control-label col-xs-12 col-sm-2">报名数量限制:</label>
                    <div class="col-xs-12 col-sm-8" id="div-enable_quantity_limit">
                        <input id="c-enable_quantity_limit" name="row[enable_quantity_limit]" type="hidden" value="0">
                        <div style="display: flex; align-items: center;">
                            <a href="javascript:;" data-toggle="switcher" class="btn-switcher text-gray"
                                data-input-id="c-enable_quantity_limit" data-yes="1" data-no="0">
                                <i class="fa fa-toggle-on fa-flip-horizontal fa-2x"></i>
                            </a>
                            <div style="margin-left: 10px;">
                                <div data-favisible="switch=1" class="text-success">开启</div>
                                <div data-favisible="switch=0" class="text-gray">关闭</div>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="form-group" id="quantity-limit-settings" style="display: none;">
                    <div class="col-xs-10 offset-xs-2 col-sm-8 col-sm-offset-2">
                        <div class="panel panel-default">
                            <div class="panel-heading">
                                <h3 class="panel-title">课程报名数量限制设置</h3>
                            </div>
                            <div class="panel-body">
                                <div class="form-group">
                                    <label class="control-label col-xs-12 col-sm-3">每人最多可报课程数:</label>
                                    <div class="col-xs-12 col-sm-8">
                                        <div class="input-group">
                                            <input type="number" name="row[max_courses_per_person]" class="form-control" 
                                                   placeholder="请输入数字，留空表示无限制" min="1" max="999"/>
                                            <span class="input-group-addon">门课程</span>
                                        </div>
                                        <div class="help-block">
                                            <small class="text-muted">设置每个用户最多可以报名多少门课程，留空表示无限制</small>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <!-- 报名表开启设置 -->
                <div class="form-group">
                    <label for="c-enable_registration_form" class="control-label col-xs-12 col-sm-2">报名表开启:</label>
                    <div class="col-xs-12 col-sm-8" id="div-enable_registration_form">
                        <input id="c-enable_registration_form" name="row[enable_registration_form]" type="hidden"
                            value="0">
                        <div style="display: flex; align-items: center;">
                            <a href="javascript:;" data-toggle="switcher" class="btn-switcher text-gray"
                                data-input-id="c-enable_registration_form" data-yes="1" data-no="0">
                                <i class="fa fa-toggle-on fa-flip-horizontal fa-2x"></i>
                            </a>
                            <div style="margin-left: 10px;">
                                <div data-favisible="switch=1" class="text-success">开启</div>
                                <div data-favisible="switch=0" class="text-gray">关闭</div>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="form-group" id="registration-form-settings" style="display: none;">
                    <div class="col-xs-10 offset-xs-2 col-sm-8 col-sm-offset-2">
                        <div class="panel panel-default">
                            <div class="panel-heading">
                                <h3 class="panel-title">报名表设置</h3>
                            </div>
                            <div class="panel-body">
                                <div class="form-group">
                                    <label class="control-label col-xs-12 col-sm-3">报名表标题:</label>
                                    <div class="col-xs-12 col-sm-8">
                                        <input type="text" name="row[form_title]" class="form-control"
                                            placeholder="请输入报名表标题" />
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="control-label col-xs-12 col-sm-3">表单描述:</label>
                                    <div class="col-xs-12 col-sm-8">
                                        <textarea name="row[form_description]" class="form-control" rows="3"
                                            placeholder="请输入报名表描述"></textarea>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="control-label col-xs-12 col-sm-3">必填字段:</label>
                                    <div class="col-xs-12 col-sm-8">
                                        <div class="panel panel-default" style="margin-bottom: 0;">
                                            <div class="panel-body" style="padding: 15px;">
                                                <!-- 基本信息 -->
                                                <div class="field-category">
                                                    <div class="category-header">
                                                        <h5 style="margin: 0 0 10px 0; font-weight: bold; color: #337ab7; border-bottom: 2px solid #337ab7; padding-bottom: 5px;">
                                                            <i class="fa fa-user"></i> 基本信息
                                                        </h5>
                                                    </div>
                                                    <div class="category-content" style="padding: 10px; background: #f9f9f9; border-left: 3px solid #337ab7; margin-bottom: 15px;">
                                                        <label class="checkbox-inline" style="margin-right: 15px;">
                                                            <input type="checkbox" name="row[required_fields][]" value="name" checked disabled> 姓名
                                                            <input type="hidden" name="row[required_fields][]" value="name">
                                                        </label>
                                                        <label class="checkbox-inline" style="margin-right: 15px;">
                                                            <input type="checkbox" name="row[required_fields][]" value="gender" checked disabled> 性别
                                                            <input type="hidden" name="row[required_fields][]" value="gender">
                                                        </label>
                                                        <label class="checkbox-inline" style="margin-right: 15px;">
                                                            <input type="checkbox" name="row[required_fields][]" value="id_card" checked disabled> 身份证号
                                                            <input type="hidden" name="row[required_fields][]" value="id_card">
                                                        </label>
                                                        <label class="checkbox-inline" style="margin-right: 15px;">
                                                            <input type="checkbox" name="row[required_fields][]" value="nation"> 民族
                                                        </label>
                                                        <label class="checkbox-inline" style="margin-right: 15px;">
                                                            <input type="checkbox" name="row[required_fields][]" value="birth_date"> 出生日期
                                                        </label>
                                                        <label class="checkbox-inline" style="margin-right: 15px;">
                                                            <input type="checkbox" name="row[required_fields][]" value="birthplace"> 籍贯
                                                        </label>
                                                        <label class="checkbox-inline" style="margin-right: 15px;">
                                                            <input type="checkbox" name="row[required_fields][]" value="political_status"> 政治面貌
                                                        </label>
                                                        <label class="checkbox-inline" style="margin-right: 15px;">
                                                            <input type="checkbox" name="row[required_fields][]" value="education"> 文化程度
                                                        </label>
                                                    </div>
                                                </div>

                                                <!-- 联系信息 -->
                                                <div class="field-category">
                                                    <div class="category-header">
                                                        <h5 style="margin: 0 0 10px 0; font-weight: bold; color: #5cb85c; border-bottom: 2px solid #5cb85c; padding-bottom: 5px;">
                                                            <i class="fa fa-phone"></i> 联系信息
                                                        </h5>
                                                    </div>
                                                    <div class="category-content" style="padding: 10px; background: #f9f9f9; border-left: 3px solid #5cb85c; margin-bottom: 15px;">
                                                        <label class="checkbox-inline" style="margin-right: 15px;">
                                                            <input type="checkbox" name="row[required_fields][]" value="phone" checked disabled> 手机号
                                                            <input type="hidden" name="row[required_fields][]" value="phone">
                                                        </label>
                                                        <label class="checkbox-inline" style="margin-right: 15px;">
                                                            <input type="checkbox" name="row[required_fields][]" value="contact_phone"> 其他联系电话
                                                        </label>
                                                        <label class="checkbox-inline" style="margin-right: 15px;">
                                                            <input type="checkbox" name="row[required_fields][]" value="email"> 邮箱
                                                        </label>
                                                        <label class="checkbox-inline" style="margin-right: 15px;">
                                                            <input type="checkbox" name="row[required_fields][]" value="address" checked disabled> 现住址
                                                            <input type="hidden" name="row[required_fields][]" value="address">
                                                        </label>
                                                    </div>
                                                </div>

                                                <!-- 家庭联系人 -->
                                                <div class="field-category">
                                                    <div class="category-header">
                                                        <h5 style="margin: 0 0 10px 0; font-weight: bold; color: #f0ad4e; border-bottom: 2px solid #f0ad4e; padding-bottom: 5px;">
                                                            <i class="fa fa-users"></i> 家庭联系人
                                                        </h5>
                                                    </div>
                                                    <div class="category-content" style="padding: 10px; background: #f9f9f9; border-left: 3px solid #f0ad4e; margin-bottom: 15px;">
                                                        <label class="checkbox-inline" style="margin-right: 15px;">
                                                            <input type="checkbox" name="row[required_fields][]" value="family_contact_name" checked disabled> 家庭联系人姓名
                                                            <input type="hidden" name="row[required_fields][]" value="family_contact_name">
                                                        </label>
                                                        <label class="checkbox-inline" style="margin-right: 15px;">
                                                            <input type="checkbox" name="row[required_fields][]" value="family_contact_relation" checked disabled> 家庭联系人关系
                                                            <input type="hidden" name="row[required_fields][]" value="family_contact_relation">
                                                        </label>
                                                        <label class="checkbox-inline" style="margin-right: 15px;">
                                                            <input type="checkbox" name="row[required_fields][]" value="family_contact_phone" checked disabled> 家庭联系人电话
                                                            <input type="hidden" name="row[required_fields][]" value="family_contact_phone">
                                                        </label>
                                                    </div>
                                                </div>

                                                <!-- 工作信息 -->
                                                <div class="field-category">
                                                    <div class="category-header">
                                                        <h5 style="margin: 0 0 10px 0; font-weight: bold; color: #5bc0de; border-bottom: 2px solid #5bc0de; padding-bottom: 5px;">
                                                            <i class="fa fa-briefcase"></i> 工作信息
                                                        </h5>
                                                    </div>
                                                    <div class="category-content" style="padding: 10px; background: #f9f9f9; border-left: 3px solid #5bc0de; margin-bottom: 15px;">
                                                        <label class="checkbox-inline" style="margin-right: 15px;">
                                                            <input type="checkbox" name="row[required_fields][]" value="former_work_unit"> 原工作单位
                                                        </label>
                                                        <label class="checkbox-inline" style="margin-right: 15px;">
                                                            <input type="checkbox" name="row[required_fields][]" value="former_unit_type"> 原单位类型
                                                        </label>
                                                        <label class="checkbox-inline" style="margin-right: 15px;">
                                                            <input type="checkbox" name="row[required_fields][]" value="former_position"> 原职务
                                                        </label>
                                                        <label class="checkbox-inline" style="margin-right: 15px;">
                                                            <input type="checkbox" name="row[required_fields][]" value="job_level"> 职级
                                                        </label>
                                                        <label class="checkbox-inline" style="margin-right: 15px;">
                                                            <input type="checkbox" name="row[required_fields][]" value="professional_title"> 职称
                                                        </label>
                                                    </div>
                                                </div>

                                                <!-- 其他信息 -->
                                                <div class="field-category">
                                                    <div class="category-header">
                                                        <h5 style="margin: 0 0 10px 0; font-weight: bold; color: #d9534f; border-bottom: 2px solid #d9534f; padding-bottom: 5px;">
                                                            <i class="fa fa-info-circle"></i> 其他信息
                                                        </h5>
                                                    </div>
                                                    <div class="category-content" style="padding: 10px; background: #f9f9f9; border-left: 3px solid #d9534f; margin-bottom: 15px;">
                                                        <label class="checkbox-inline" style="margin-right: 15px;">
                                                            <input type="checkbox" name="row[required_fields][]" value="specialty"> 特长
                                                        </label>
                                                        <label class="checkbox-inline" style="margin-right: 15px;">
                                                            <input type="checkbox" name="row[required_fields][]" value="medical_history"> 疾病史
                                                        </label>
                                                    </div>
                                                </div>

                                                <div class="help-block" style="margin-top: 10px; padding: 10px; background: #dff0d8; border: 1px solid #d6e9c6; border-radius: 4px;">
                                                    <i class="fa fa-info-circle text-info"></i>
                                                    <small class="text-muted">选择用户报名时必须填写的字段，未选择的字段为可选填写。建议根据报名项目的特点选择相应的必填字段。</small>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <!-- 手签板设置 -->
                <div class="form-group">
                    <label for="c-enable_signature_pad" class="control-label col-xs-12 col-sm-2">手签板:</label>
                    <div class="col-xs-12 col-sm-8" id="div-enable_signature_pad">
                        <input id="c-enable_signature_pad" name="row[enable_signature_pad]" type="hidden" value="0">
                        <div style="display: flex; align-items: center;">
                            <a href="javascript:;" data-toggle="switcher" class="btn-switcher text-gray"
                                data-input-id="c-enable_signature_pad" data-yes="1" data-no="0">
                                <i class="fa fa-toggle-on fa-flip-horizontal fa-2x"></i>
                            </a>
                            <div style="margin-left: 10px;">
                                <div data-favisible="switch=1" class="text-success">开启</div>
                                <div data-favisible="switch=0" class="text-gray">关闭</div>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="form-group" id="signature-pad-settings" style="display: none;">
                    <div class="col-xs-10 offset-xs-2 col-sm-8 col-sm-offset-2">
                        <div class="panel panel-default">
                            <div class="panel-heading">
                                <h3 class="panel-title">手签板设置</h3>
                            </div>
                            <div class="panel-body">
                                <div class="form-group">
                                    <label class="control-label col-xs-12 col-sm-3">主题:</label>
                                    <div class="col-xs-12 col-sm-8">
                                        <input type="text" name="row[signature_title]" class="form-control"
                                            value="青秀区老年大学学习活动安全承诺书"
                                            placeholder="请输入承诺书主题" />
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="control-label col-xs-12 col-sm-3">正文:</label>
                                    <div class="col-xs-12 col-sm-8">
                                        <textarea name="row[signature_content]" class="form-control editor" rows="8"
                                            placeholder="请输入承诺书正文内容">本人身体健康状况良好，自愿参加青秀区老年大学的学习和活动；自愿参加上级部门、学校、学校群团组织（临时党支部、学委会、艺术团、老文体协会等）和班级组织开展的各项活动，包括各种培训（讲座）、各种比赛、各种演出（展演）、各种交流、各种志愿活动等。学习、活动期间，本人将根据自身身体状况，独立判断行动风险，以保障自身人身安全，并有权暂停参加活动。若因自身疾病、身体、行为（行动）等原因发生意外事件或安全事故，或不可抗力等原因所造成的后果，组织者和其他参与者不承担责任，后果一律由本人和家属（担保人）承担责任，学校不负任何经济责任或连带责任。特此承诺。</textarea>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="control-label col-xs-12 col-sm-3">落款样式:</label>
                                    <div class="col-xs-12 col-sm-8">
                                        <textarea name="row[signature_footer]" class="form-control editor" rows="6"
                                            placeholder="请输入落款样式内容">承诺人姓名：
承诺人身份证号：
承诺人签名：

年满70及以上人员家属（担保人）姓名：
家属（担保人）身份证号：
家属（担保人）联系方式：
家属（担保人）与本人关系：
家属（担保人）签名：</textarea>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <!-- 事项设置 -->
                <div class="form-group">
                    <label for="c-enable_matters_setting" class="control-label col-xs-12 col-sm-2">事项设置:</label>
                    <div class="col-xs-12 col-sm-8" id="div-enable_matters_setting">
                        <input id="c-enable_matters_setting" name="row[enable_matters_setting]" type="hidden" value="0">
                        <div style="display: flex; align-items: center;">
                            <a href="javascript:;" data-toggle="switcher" class="btn-switcher text-gray"
                                data-input-id="c-enable_matters_setting" data-yes="1" data-no="0">
                                <i class="fa fa-toggle-on fa-flip-horizontal fa-2x"></i>
                            </a>
                            <div style="margin-left: 10px;">
                                <div data-favisible="switch=1" class="text-success">开启</div>
                                <div data-favisible="switch=0" class="text-gray">关闭</div>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="form-group" id="matters-settings" style="display: none;">
                    <div class="col-xs-10 offset-xs-2 col-sm-8 col-sm-offset-2">
                        <div class="panel panel-default">
                            <div class="panel-heading">
                                <h3 class="panel-title">事项设置</h3>
                            </div>
                            <div class="panel-body">
                                <!-- 导课模式选项卡 -->
                                <ul class="nav nav-tabs" role="tablist">
                                    <li role="presentation" class="active">
                                        <a href="#auto-import" aria-controls="auto-import" role="tab" data-toggle="tab">全自动导入</a>
                                    </li>
                                    <li role="presentation">
                                        <a href="#table-import" aria-controls="table-import" role="tab" data-toggle="tab">定义表格导入</a>
                                    </li>
                                    <li role="presentation">
                                        <a href="#class-import" aria-controls="class-import" role="tab" data-toggle="tab">班级导入</a>
                                    </li>
                                    <li role="presentation">
                                        <a href="#manual-setting" aria-controls="manual-setting" role="tab" data-toggle="tab">手动设置</a>
                                    </li>
                                </ul>

                                <!-- 选项卡内容 -->
                                <div class="tab-content" style="margin-top: 15px;">
                                    <!-- 全自动导入 -->
                                    <div role="tabpanel" class="tab-pane active" id="auto-import">
                                        <div class="form-group">
                                            <label class="control-label col-xs-12 col-sm-3">课程表项目名称:</label>
                                            <div class="col-xs-12 col-sm-8">
                                                <select name="row[table_id]" id="c-table_id" class="form-control">
                                                    <option value="">请选择课程表</option>
                                                </select>
                                            </div>
                                        </div>
                                    </div>

                                    <!-- 定义表格导入 -->
                                    <div role="tabpanel" class="tab-pane" id="table-import">
                                        <div class="form-group">
                                            <label class="control-label col-xs-12 col-sm-3">课程表excel表格导入:</label>
                                            <div class="col-xs-12 col-sm-8">
                                                <input type="file" name="course_excel_file" class="form-control" 
                                                    accept=".xlsx,.xls" placeholder="请选择Excel文件" />
                                                <input type="hidden" name="row[course_excel_path]" value="" />
                                                <div class="help-block">
                                                    <small class="text-muted">支持.xlsx和.xls格式的Excel文件</small>
                                                </div>
                                            </div>
                                        </div>
                                    </div>

                                    <!-- 班级导入 -->
                                    <div role="tabpanel" class="tab-pane" id="class-import">
                                        <div id="class-import-items">
                                            <div class="class-import-item" style="border: 1px solid #ddd; padding: 20px; margin-bottom: 20px; border-radius: 6px; background: #fafafa;">
                                                <div class="row" style="margin-bottom: 15px;">
                                                    <div class="col-md-6">
                                                        <div class="form-group" style="margin-bottom: 15px; margin-right: 10px;">
                                                            <label class="control-label" style="margin-bottom: 8px; font-weight: 600;">班级:</label>
                                                            <select name="row[class_items][0][class_id]" id="c-classes_id" class="form-control" style="height: 36px;">
                                                                <option value="">请选择班级</option>
                                                            </select>
                                                        </div>
                                                    </div>
                                                    <div class="col-md-6">
                                                        <div class="form-group" style="margin-bottom: 15px; margin-left: 10px;">
                                                            <label class="control-label" style="margin-bottom: 8px; font-weight: 600;">教学点:</label>
                                                            <select name="row[class_items][0][teaching_point]" id="c-ocation_class" class="form-control" style="height: 36px;">
                                                                <option value="">请选择教学点</option>
                                                            </select>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="row" style="margin-bottom: 15px;">
                                                    <div class="col-md-4">
                                                        <div class="form-group" style="margin-bottom: 15px; margin-right: 10px;">
                                                            <label class="control-label" style="margin-bottom: 8px; font-weight: 600;">上课时间:</label>
                                                            <input type="text" name="row[class_items][0][class_time]" class="form-control" style="height: 36px;" placeholder="请输入上课时间" />
                                                        </div>
                                                    </div>
                                                    <div class="col-md-4">
                                                        <div class="form-group" style="margin-bottom: 15px; margin-left: 5px; margin-right: 5px;">
                                                            <label class="control-label" style="margin-bottom: 8px; font-weight: 600;">课程类型:</label>
                                                            <select name="row[class_items][0][course_type]" class="form-control" style="height: 36px;">
                                                                <option value="1">课程</option>
                                                                <option value="2">活动</option>
                                                            </select>
                                                        </div>
                                                    </div>
                                                    <div class="col-md-4">
                                                        <div class="form-group" style="margin-bottom: 15px; margin-left: 10px;">
                                                            <label class="control-label" style="margin-bottom: 8px; font-weight: 600;">费用:</label>
                                                            <input type="number" name="row[class_items][0][fee]" class="form-control" style="height: 36px;" placeholder="请输入费用" step="0.01" />
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="row">
                                                    <div class="col-md-6">
                                                        <div class="form-group" style="margin-bottom: 10px; margin-right: 10px;">
                                                            <label class="control-label" style="margin-bottom: 8px; font-weight: 600;">名额:</label>
                                                            <input type="number" name="row[class_items][0][quota]" class="form-control" style="height: 36px;" placeholder="请输入名额" />
                                                        </div>
                                                    </div>
                                                    <div class="col-md-6">
                                                        <div class="form-group" style="margin-top: 30px; margin-left: 10px; text-align: right;">
                                                            <button type="button" class="btn-save-class-custom save-class-item" style="padding: 6px 12px; margin-right: 10px; background-color: #5cb85c; color: white; border: 1px solid #4cae4c; border-radius: 4px; cursor: pointer;">
                                                                <i class="fa fa-save"></i> 保存班级
                                                            </button>
                                                            <button type="button" class="btn btn-danger btn-sm remove-class-item" style="padding: 6px 12px;">
                                                                <i class="fa fa-trash"></i> 删除此项
                                                            </button>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <button type="button" class="btn btn-success btn-sm" id="add-class-item">添加班级项目</button>
                                        </div>
                                    </div>

                                    <!-- 手动设置 -->
                                    <div role="tabpanel" class="tab-pane" id="manual-setting">
                                        <div class="alert alert-info">
                                            <i class="fa fa-info-circle"></i>
                                            手动设置功能正在开发中，敬请期待...
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <!-- 线下报名设置 -->
                <div class="form-group">
                    <label for="c-enable_offline_registration" class="control-label col-xs-12 col-sm-2">线下报名:</label>
                    <div class="col-xs-12 col-sm-8" id="div-enable_offline_registration">
                        <input id="c-enable_offline_registration" name="row[enable_offline_registration]" type="hidden"
                            value="0">
                        <div style="display: flex; align-items: center;">
                            <a href="javascript:;" data-toggle="switcher" class="btn-switcher text-gray"
                                data-input-id="c-enable_offline_registration" data-yes="1" data-no="0">
                                <i class="fa fa-toggle-on fa-flip-horizontal fa-2x"></i>
                            </a>
                            <div style="margin-left: 10px;">
                                <div data-favisible="switch=1" class="text-success">开启</div>
                                <div data-favisible="switch=0" class="text-gray">关闭</div>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="form-group" id="offline-registration-settings" style="display: none;">
                    <div class="col-xs-10 offset-xs-2 col-sm-8 col-sm-offset-2">
                        <div class="panel panel-default">
                            <div class="panel-heading">
                                <h3 class="panel-title">线下报名设置</h3>
                            </div>
                            <div class="panel-body">
                                <div class="form-group">
                                    <label for="c-offline_quota" class="control-label col-xs-12 col-sm-3">线下名额数量:</label>
                                    <div class="col-xs-12 col-sm-8">
                                        <input id="c-offline_quota" name="row[offline_quota]" type="number" class="form-control" value="0" min="0">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="c-offline_payment_time_limit" class="control-label col-xs-12 col-sm-3">线下报名缴费时间限制:</label>
                                    <div class="col-xs-12 col-sm-8">
                                        <div class="input-group">
                                            <input id="c-offline_payment_time_limit" name="row[offline_payment_time_limit]" type="number" class="form-control" value="24" min="1" max="168">
                                            <div class="input-group-addon">小时</div>
                                        </div>
                                        <span class="help-block">设置线下报名后需要在多少小时内完成缴费，超时将自动取消报名</span>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>



                <div class="form-group">
                    <label for="c-intro" class="control-label col-xs-12 col-sm-2">课程介绍 :</label>
                    <div class="col-xs-12 col-sm-8" id="div-intro">
                        <textarea name="row[intro]" id="c-intro" class="form-control editor" data-rule="" rows="5"
                            data-tip="课程介绍 "></textarea>
                    </div>
                </div>

                <div class="form-group">
                    <label for="c-cover" class="control-label col-xs-12 col-sm-2">封面 :</label>
                    <div class="col-xs-12 col-sm-8" id="div-cover">
                        <div class="form-inline">
                            <input id="c-cover" class="form-control" size="37" name="row[cover]" type="text" value=""
                                data-tip="">
                            <span><button type="button" id="plupload-cover" class="btn btn-danger plupload"
                                    data-input-id="c-cover" data-mimetype="image/*" data-multiple="false"
                                    data-preview-id="p-cover"><i class="fa fa-upload"></i>
                                    {:__('Upload')}</button></span>
                            <span><button type="button" id="fachoose-cover" class="btn btn-primary fachoose"
                                    data-input-id="c-cover" data-mimetype="image/*" data-multiple="false"><i
                                        class="fa fa-list"></i> {:__('Choose')}</button></span>
                            <ul class="row list-inline plupload-preview" id="p-cover"></ul>
                        </div>
                    </div>
                </div>


                <div class="form-group">
                    <label for="c-start_time" class="control-label col-xs-12 col-sm-2">开始时间:</label>
                    <div class="col-xs-12 col-sm-8" id="div-start_time">
                        <input type="text" id="c-start_time" name="row[start_time]" value=""
                            class="form-control datetimepicker" data-use-current="true"
                            data-date-format="YYYY-MM-DD HH:mm:ss" data-tip="开始时间" data-rule="" />
                    </div>
                </div>

                <div class="form-group">
                    <label for="c-end_time" class="control-label col-xs-12 col-sm-2">结束时间 :</label>
                    <div class="col-xs-12 col-sm-8" id="div-end_time">
                        <input type="text" id="c-end_time" name="row[end_time]" value=""
                            class="form-control datetimepicker" data-use-current="true"
                            data-date-format="YYYY-MM-DD HH:mm:ss" data-tip="结束时间 " data-rule="" />
                    </div>
                </div>

                <div class="form-group">
                    <label for="c-max_num" class="control-label col-xs-12 col-sm-2">招生人数限制:</label>
                    <div class="col-xs-12 col-sm-8" id="div-max_num">
                        <input type="number" id="c-max_num" name="row[max_num]" value="0" class="form-control"
                            title="max_num" data-rule="integer" placeholder="只能填入整数" data-tip="招生人数" />
                    </div>
                </div>

                <div class="form-group">
                    <label for="c-is_use_integral" class="control-label col-xs-12 col-sm-2">是否允许积分兑换:</label>
                    <div class="col-xs-12 col-sm-8" id="div-is_use_integral">
                        <input id="c-is_use_integral" name="row[is_use_integral]" type="hidden"
                               value="{$row.is_use_integral|default=0}">
                        <div style="display: flex; align-items: center;">
                            <a href="javascript:;" data-toggle="switcher"
                               class="btn-switcher text-gray"
                               data-input-id="c-is_use_integral" data-yes="1" data-flip-horizontal="true" data-no="0">
                                <i class="fa fa-toggle-on fa-2x"></i>
                            </a>
                            <div style="margin-left: 10px;">
                                <div data-favisible="switch=1" class="text-success">允许</div>
                                <div data-favisible="switch=0" class="text-gray">不允许</div>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="form-group">
                    <label for="c-is_real" class="control-label col-xs-12 col-sm-2">是否正式报名:</label>
                    <div class="col-xs-12 col-sm-8" id="div-is_real">
                        <input id="c-is_real" name="row[is_real]" type="hidden" value="0">
                        <div style="display: flex; align-items: center;">
                            <a href="javascript:;" data-toggle="switcher" class="btn-switcher" data-input-id="c-is_real"
                                data-yes="1" data-no="0">
                                <i class="fa fa-toggle-on fa-flip-horizontal fa-2x"></i>
                            </a>
                            <div style="margin-left: 10px;">
                                <div data-favisible="switch=1" class="text-success">是</div>
                                <div data-favisible="switch=0" class="text-gray">否</div>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="form-group">
                    <label for="c-is_close" class="control-label col-xs-12 col-sm-2">是否关闭:</label>
                    <div class="col-xs-12 col-sm-8" id="div-is_close">
                        <input id="c-is_close" name="row[is_close]" type="hidden" value="0">
                        <div style="display: flex; align-items: center;">
                            <a href="javascript:;" data-toggle="switcher" class="btn-switcher"
                                data-input-id="c-is_close" data-yes="1" data-no="0">
                                <i class="fa fa-toggle-on fa-flip-horizontal fa-2x"></i>
                            </a>
                            <div style="margin-left: 10px;">
                                <div data-favisible="switch=1" class="text-danger">关闭</div>
                                <div data-favisible="switch=0" class="text-success">未关闭</div>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="form-group">
                    <label for="c-is_opened" class="control-label col-xs-12 col-sm-2">是否开启过:</label>
                    <div class="col-xs-12 col-sm-8" id="div-is_opened">
                        <input id="c-is_opened" name="row[is_opened]" type="hidden" value="0">
                        <div style="display: flex; align-items: center;">
                            <a href="javascript:;" data-toggle="switcher" class="btn-switcher"
                                data-input-id="c-is_opened" data-yes="1" data-no="0">
                                <i class="fa fa-toggle-on fa-flip-horizontal fa-2x"></i>
                            </a>
                            <div style="margin-left: 10px;">
                                <div data-favisible="switch=1" class="text-success">已开启</div>
                                <div data-favisible="switch=0" class="text-gray">未开启</div>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="form-group">
                    <label for="c-is_finished" class="control-label col-xs-12 col-sm-2">是否结束:</label>
                    <div class="col-xs-12 col-sm-8" id="div-is_finished">
                        <input id="c-is_finished" name="row[is_finished]" type="hidden"
                               value="0">
                        <div style="display: flex; align-items: center;">
                            <a href="javascript:;" data-toggle="switcher"
                               class="btn-switcher text-gray"
                               data-input-id="c-is_finished" data-yes="1" data-no="0">
                                <i class="fa fa-toggle-on fa-2x"></i>
                            </a>
                            <div style="margin-left: 10px;">
                                <div data-favisible="switch=1" class="text-warning">已结束</div>
                                <div data-favisible="switch=0" class="text-gray">未结束</div>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="form-group">
                    <label for="c-is_user_end" class="control-label col-xs-12 col-sm-2">是否手动截止:</label>
                    <div class="col-xs-12 col-sm-8" id="div-is_user_end">
                        <input id="c-is_user_end" name="row[is_user_end]" type="hidden" value="0">
                        <div style="display: flex; align-items: center;">
                            <a href="javascript:;" data-toggle="switcher" class="btn-switcher"
                                data-input-id="c-is_user_end" data-yes="1" data-no="0">
                                <i class="fa fa-toggle-on fa-flip-horizontal fa-2x"></i>
                            </a>
                            <div style="margin-left: 10px;">
                                <div data-favisible="switch=1" class="text-success">是</div>
                                <div data-favisible="switch=0" class="text-gray">否</div>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="form-group">
                    <label for="c-is_end" class="control-label col-xs-12 col-sm-2">是否截止:</label>
                    <div class="col-xs-12 col-sm-8" id="div-is_end">
                        <input id="c-is_end" name="row[is_end]" type="hidden" value="0">
                        <div style="display: flex; align-items: center;">
                            <a href="javascript:;" data-toggle="switcher" class="btn-switcher" data-input-id="c-is_end"
                                data-yes="1" data-no="0">
                                <i class="fa fa-toggle-on fa-flip-horizontal fa-2x"></i>
                            </a>
                            <div style="margin-left: 10px;">
                                <div data-favisible="switch=1" class="text-danger">已截止</div>
                                <div data-favisible="switch=0" class="text-success">未截止</div>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="form-group">
                    <label for="c-dead_time" class="control-label col-xs-12 col-sm-2">截止时间 :</label>
                    <div class="col-xs-12 col-sm-8" id="div-dead_time">
                        <input type="text" id="c-dead_time" name="row[dead_time]" value=""
                            class="form-control datetimepicker" data-use-current="true"
                            data-date-format="YYYY-MM-DD HH:mm:ss" data-tip="截止时间 " data-rule="" />
                    </div>
                </div>
                <!-- ... 原有所有表单内容 ... -->
                <div class="form-group layer-footer">
                    <label class="control-label col-xs-12 col-sm-2"></label>
                    <div class="col-xs-12 col-sm-8">
                        <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
                        <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
                    </div>
                </div>
            </div>

            <!-- 项目详情 -->
            <div role="tabpanel" class="tab-pane fade" id="project-detail">
                <!-- 项目详情内容 -->
            </div>

            <!-- 班级情况 -->
            <div role="tabpanel" class="tab-pane fade" id="class-info">
                <!-- 班级情况内容 -->
            </div>

            <!-- 报名学员详情 -->
            <div role="tabpanel" class="tab-pane fade" id="student-detail">
                <!-- 报名学员详情内容 -->
            </div>

            <!-- 报名情况 -->
            <div role="tabpanel" class="tab-pane fade" id="registration-info">
                <!-- 报名情况内容 -->
            </div>

            <!-- 报名情况汇总 -->
            <div role="tabpanel" class="tab-pane fade" id="registration-summary">
                <!-- 报名情况汇总内容 -->
            </div>

            <!-- 预报名地理位置分布图 -->
            <div role="tabpanel" class="tab-pane fade" id="pre-registration-map">
                <div id="map-container" style="height: 500px;"></div>
            </div>
        </div>
    </div>
</form>